<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/7/5
  Time: 14:44
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<script src="js/jquery.js"></script>

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>教学管理系统</title>
    <link rel="stylesheet" href="css/public.css"/>
    <link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<style>
    img{
        width: 20px;
        height: 20px;
    }
</style>

<%--<%--%>
    <%--request.setCharacterEncoding("utf-8");--%>
    <%--List<Grade> all = ( List<Grade>)request.getAttribute("all");--%>
    <%--Student student =(Student) request.getAttribute("student");--%>
<%--%>--%>
<!--主体内容-->
<%@include file="/checkLogin.jsp"%>
<section class="publicMian ">
    <div class="right">
        <div class="location">
            <strong>你现在所在的位置是:</strong>
            <span>课程管理页面 >> 课程修改页</span>
        </div>
        <div class="providerAdd">
            <form action="studentUpdate" method="post" enctype="multipart/form-data">
                <!--div的class 为error是验证错误，ok是验证成功-->
                <div class="">
                    <label for="stuno">学号：</label>
                    <input type="text"  name="stuno" id="stuno" value="${student.getStuno()}" readonly/>
                    <span>*</span>
                </div>
                <div class="">
                    <label for="sname">姓名：</label>
                    <input type="text"  name="sname" id="sname" value="${student.getSname()}"/>
                    <span>*</span>
                </div>
                <div>
                    <label >性别：</label>

                    <%--<input type="radio" name="gender" <%if(student.getSex().equals("男"))--%>
                        <%--out.print("checked");%> value="男"/>男--%>
                    <%--<input type="radio" name="gender" <%if(student.getSex().equals("女"))--%>
                        <%--out.print("checked");%> value="女" />女--%>
                    <%--<input type="radio" name="gender" <%if(student.getSex().equals("妖"))--%>
                        <%--out.print("checked");%> value="妖"/>妖--%>
                    <%--<input type="radio" name="gender" <%if(student.getSex().equals("人妖"))--%>
                        <%--out.print("checked");%> value="人妖"/>人妖--%>
                    <input type="radio" name="gender" value="男"/>男
                    <input type="radio" name="gender" value="女" />女
                    <input type="radio" name="gender" value="妖"/>妖
                    <input type="radio" name="gender" value="人妖"/>人妖

                    <span >*</span>
                </div>
                <div>
                    <label for="tel">电话：</label>
                    <input type="number" name="tel" id="tel" value="${student.getTelephone()}"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="providerName3">qq：</label>
                    <input type="number" name="qq" id="providerName3" value="${student.getQq()}"/>
                    <span >*</span>
                </div>

                <div>
                    <label for="wechat">微信：</label>
                    <input type="number" name="wechat" id="wechat" value="${student.getWechat()}"/>
                    <span >*</span>
                </div>
                <div>
                    <label>请选择年级信息：</label>
                    <select name="gradeId" id="gradeId">
                        <c:forEach items="${all}" var="grade">
                        <option value="${grade.getId()}">${grade.getGname()}</option>
                        </c:forEach>
                    </select>
                    <span></span>

                </div>
                <div>
                    <label for="enterDate">入学时间：</label>
                    <input type="date" name="enterDate" id="enterDate" value="<fmt:formatDate value="${student.getEnterdate()}" pattern="yyyy-MM-dd"/>"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="city">来自城市：</label>
                    <input type="text" name="city" id="city" value="${student.getFromcity()}"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="birth">出生日期：</label>
                    <input type="date" name="birth" id="birth"  value="<fmt:formatDate value="${student.getBirthday()}" pattern="yyyy-MM-dd"/>"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="address">地址：</label>
                    <input type="text" name="address" id="address" value="${student.getAddress()}"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="psd">密码：</label>
                    <input type="password" name="psd" id="psd" value="${student.getPass()}"/>
                    <span >*</span>
                </div>
                <div>
                    <label for="idcardpic">请上传身份证正面照</label>
                    <input type="file" name="idcardpic" id="idcardpic" value=""/>
                    <span >*请上传身份证正面照</span>
                    <br>
                   <img src="${student.getIdcardpic()}" width="50px" height="50px">

                </div>
                <div>
                    <span></span>
                </div>
                <div>
                    <span></span>

                </div>
                <div>
                    <span></span>

                </div>
                <div>
                    <span></span>

                </div>
                <div class="providerAddBtn">
                    <!--<a href="#">保存</a>-->
                    <!--<a href="providerList.html">返回</a>-->
                    <input type="submit" value="保存"/>
                    <input type="button" value="返回" onclick="history.back(-1)"/>
                </div>
            </form>
        </div>

    </div>
</section>
<script>
    $(function () {
        $("#gradeId").val(${student.getGradeid()});
    })
</script>
<script>
    $("[name=gender][value=${student.getSex()}]").prop("checked",true);
</script>
<footer class="footer">
</footer>



</body>
</html>